package Demo01.demo04;

import java.util.Random;

public class AddAbleTest {
    public static void main(String[] args) {
        useaddable(new addable() {
            @Override
            public int add(int MAX, int min) {
                System.out.println("MAX:" + MAX);
                System.out.println("min:" + min);
                return MAX + min;
            }
        });

    }

    public static void useaddable(addable a) {
        Random r = new Random();
        int number = a.add(r.nextInt(1000) + 100, r.nextInt(100) + 1);
        System.out.println(number);
    }
}

